/**
 * Name        : InheritanceContainer.cpp
 * Version     : 1.0.0
 * Vendor      : badadev.com
 * Description : Container object used for communication between parent-children
 * Lincense    : This program is free software. It comes without any warranty, to
 *               the extent permitted by applicable law. You can redistribute it
 *               and/or modify it under the terms of the Do What The Fuck You Want
 *               To Public License, Version 2, as published by Sam Hocevar. See
 *               http://sam.zoy.org/wtfpl/COPYING for more details.
 */

#include "InheritanceContainer.h"

using namespace badadev;

InheritanceContainer::InheritanceContainer() : parent_(0) {}
InheritanceContainer::~InheritanceContainer(){}


void
InheritanceContainer::setParent(InheritanceContainer & parent)
{
	parent_ = &parent;
}

void
InheritanceContainer::sendContainerActionToParent(int actionId)
{
	if(parent_)
	{
		parent_->receiveContainerActionFromChild(actionId, *this);
	}
}


void
InheritanceContainer::receiveContainerActionFromChild(const int actionId,
			                                     InheritanceContainer &child)
{
	// DO NOTHING
	// This one is meant to be overriden by those Inheritance Containers
	// that serve as parents
}


